//
//  CMSChartsModel.m
//  CMSCharts
//
//  Created by symbio on 2023/2/17.
//

#import "CMSChartsModel.h"

@implementation CMSChartsModel

+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper {
    return @{
        @"amount": @"Amount",
        @"close": @"Close",
        @"high": @"High",
        @"low": @"Low",
        @"open": @"Open",
        @"periodVolume": @"PeriodVolume",
        @"updateTime": @"UpdateTime",
        @"volume": @"Volume"
    };
}

- (NSString *)updateTimeValue {
    NSDate *date = [NSDate dateWithTimeIntervalSince1970:self.updateTime];
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    dateFormatter.dateFormat = @"MM/dd HH:mm";
    return [dateFormatter stringFromDate:date];
}

@end
